﻿
using BCCommon;
using BCCommon.Enums;
using BCData.Trading.Purchase.GoodsPurchaseItem;
using BCDto.Trading.Purchase.GoodsPurchaseItem;
using BCEntity.Trading.Purchase.GoodsPurchaseItem;
using BCService.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace BCService.Trading.Purchase.GoodsPurchaseItem
{
    /// <summary>
    /// 商品采购项
    /// </summary>
    public interface IGoodsPurchaseItemService
    {
        #region  成员方法
        /// <summary>
        /// 是否存在此记录
        /// </summary>
        /// <param name="goodsPurchaseItemId">商品采购项Id</param>
        bool Exists(long goodsPurchaseItemId);
        /// <summary>
        /// 添加商品采购项
        /// </summary>
        /// <param name="requestDto">商品采购项信息</param>
        GoodsPurchaseItemDto Add(GoodsPurchaseItemRequestDto requestDto);
        /// <summary>
        /// 更新商品采购项
        /// </summary>
        /// <param name="putDto">商品采购项信息</param>
        GoodsPurchaseItemDto Update(GoodsPurchaseItemPutDto putDto);
        /// <summary>
        /// 删除商品采购项
        /// </summary>
        /// <param name="goodsPurchaseItemId">商品采购项Id</param>
        bool Delete(long goodsPurchaseItemId);
        /// <summary>
        /// 获取商品采购项
        /// </summary>
        /// <param name="goodsPurchaseItemId">商品采购项Id</param>
        GoodsPurchaseItemDto Get(long goodsPurchaseItemId);
        /// <summary>
        /// 获取商品采购项列表
        /// </summary>
        /// <param name="adminId">创建人Id</param>
        /// <param name="hasTask">已生成采购任务</param>
        IEnumerable<GoodsPurchaseItemDto> GetList(long adminId, bool? hasTask);
        /// <summary>
        /// 获取商品采购项分页列表
        /// </summary>
        /// <param name="categoryName">商品分类名称</param>
        /// <param name="goodsName">商品名称</param>
        /// <param name="sku">商品SKU</param>
        /// <param name="vendorName">供应商名称</param>
        /// <param name="adminName">创建人姓名</param>
        /// <param name="adminId">创建人Id</param>
        /// <param name="vendorId">供应商Id</param>
        /// <param name="hasTask">已生成采购任务</param>
        /// <param name="start">开始时间</param>
        /// <param name="end">结束时间</param>
        /// <param name="sortName">排序字段</param>
        /// <param name="ascending">升序</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="pageSize">商品采购项每页数据条数</param>
        PageableList<GoodsPurchaseItemDto> Query(string categoryName, string goodsName, string sku, string vendorName, string adminName, long? adminId, int? vendorId, bool? hasTask, DateTime? start, DateTime? end, string sortName, bool? ascending, int pageIndex, int pageSize);
        #endregion  成员方法

        /// <summary>
        /// 获取采购项存在的供应商列表
        /// </summary>
        /// <returns></returns>
        IEnumerable<GoodsPurchaseItemDto> GetPurchaseItemsVendorList();
    }
}